package henu.innovation.service;

import henu.innovation.entity.Exam;
import henu.innovation.entity.Student;
import henu.innovation.entity.Teacher;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface TeacherService {
    Teacher TeacherSignIn(String name, String password);
    Teacher FindTeacherById(int id);
    Boolean TeacherPasswordChanged(Teacher teacher);
    //增
    boolean addTeacher(Teacher teacher);
    //删
    boolean deleteTeacherById(int id);
    //查询所有
    List<Teacher> findAllTeachers();
    boolean updateTeacher(Teacher teacher);
    //
   // Exam teacherAddExam(@Param("ename") String name,@Param("etime") String starttime,@Param("eautostart") Boolean autostart);
    Boolean teacherAddExam(Exam exam);

    Exam teacherFindExam(int id);
    List<Exam> showAllExamsByCreator(@Param("creator")String creator);
    List<Exam> showAllExams();
    boolean deleteExamById(@Param("id")int id);

    //Boolean teacherAddStudent(@Param("sno")String number,@Param("sname")String name,@Param("sclass")String clazz);
    Boolean teacherAddStudent(Student student);
    //
    public boolean excelUpload(String name, MultipartFile file);
    //查找学生
    Student teacherFindStudent(@Param("sno")String number, @Param("sname")String name, @Param("sclass")String clazz);
    //查找学生通过ip
    Student teacherFindStudentByIp(@Param("ip")String ipbinding);
}
